# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V33.Model.City do
  @moduledoc """
  Contains information about a city that can be targeted by ads.

  ## Attributes

  *   `countryCode` (*type:* `String.t`, *default:* `nil`) - Country code of the country to which this city belongs.
  *   `countryDartId` (*type:* `String.t`, *default:* `nil`) - DART ID of the country to which this city belongs.
  *   `dartId` (*type:* `String.t`, *default:* `nil`) - DART ID of this city. This is the ID used for targeting and generating reports.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string "dfareporting#city".
  *   `metroCode` (*type:* `String.t`, *default:* `nil`) - Metro region code of the metro region (DMA) to which this city belongs.
  *   `metroDmaId` (*type:* `String.t`, *default:* `nil`) - ID of the metro region (DMA) to which this city belongs.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Name of this city.
  *   `regionCode` (*type:* `String.t`, *default:* `nil`) - Region code of the region to which this city belongs.
  *   `regionDartId` (*type:* `String.t`, *default:* `nil`) - DART ID of the region to which this city belongs.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :countryCode => String.t() | nil,
          :countryDartId => String.t() | nil,
          :dartId => String.t() | nil,
          :kind => String.t() | nil,
          :metroCode => String.t() | nil,
          :metroDmaId => String.t() | nil,
          :name => String.t() | nil,
          :regionCode => String.t() | nil,
          :regionDartId => String.t() | nil
        }

  field(:countryCode)
  field(:countryDartId)
  field(:dartId)
  field(:kind)
  field(:metroCode)
  field(:metroDmaId)
  field(:name)
  field(:regionCode)
  field(:regionDartId)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V33.Model.City do
  def decode(value, options) do
    GoogleApi.DFAReporting.V33.Model.City.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V33.Model.City do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
